# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=sntpc
pkgver=0.9
pkgrel=6
pkgdesc="Simple NTP client"
url="https://git.alpinelinux.org/cgit/hosted/sntpc/"
arch="all"
license="GPL-2.0"
depends=""
source="https://dev.alpinelinux.org/archive/$pkgname/$pkgname-$pkgver.tar.xz
	sntpc.initd
	sntpc.confd
	"
builddir="$srcdir/$pkgname-$pkgver"

build() {
	cd "$builddir"
	make || return 1
}

package() {
	cd "$builddir"
	install -m755 -D sntpc "$pkgdir"/usr/sbin/sntpc || return 1
	install -m755 -D "$srcdir"/sntpc.initd "$pkgdir"/etc/init.d/sntpc
	install -m644 -D "$srcdir"/sntpc.confd "$pkgdir"/etc/conf.d/sntpc
}

sha512sums="c18bb0da4b7804bcbb81da65dd4ab6de4288d2475c441a7b1246631d2500b474d4e95e60cc7752762fb092b49bb6c9fd5e5290c69e247293b3e094e45d18f76d  sntpc-0.9.tar.xz
72a803a7393424c996b176d0e4df078b2af26b84650793cf3b7b187416878f467aca3a0c96a9cadead065d169ac80a29ae0ceb46ec4b3b26d6d552e30f3562e3  sntpc.initd
2fcb7d45f4c6588fd5281c02161a4aebb7e0a9d259a2ac3aa6c3187617dc7029f05fbebbb227feace61cc706e37ca0acb18b0019a67c674c444498fd289a9975  sntpc.confd"
